/**
 * 
 */
package com.google.android.gcm.demo.app.model;

import org.restlet.resource.ClientResource;

import android.util.Log;


/**
 * @author GQXG9096
 * 
 */
public class PhoneController {

	public final ClientResource cr = new ClientResource(
			EngineConfiguration.server_path + "/rest/phone");
	

	public PhoneController() {
		EngineConfiguration.getInstance();
	}

	public void addPhone(Phone phone) throws Exception {
		final PhoneControllerInterface uci = cr
				.wrap(PhoneControllerInterface.class);

		try {
			uci.addPhone(phone);
			Log.i("PhoneController", "Creation success !");
		} catch (Exception e) {
			Log.i("PhoneController", "Creation failed !");
			throw e;
		}
	}

}
